<template>
    <el-pagination
        background
        layout="prev, pager, next,total"
        :total="length"
        :page-size="pagination.pagesize"
        @current-change="handleCurrentChange"
        :current-page.sync="pagination.currpage"
        @size-change="handleSizeChange"
        :style="'float:' + float"
    ></el-pagination>
</template>
<script>
export default {
    props: {
        float: {},
        length: {
            type: Number
        },
        pagination: {}
    },
    methods: {
        //分页
        handleCurrentChange(cpage) {
            this.pagination.currpage = cpage;
            this.$emit("currpage");
        },
        handleSizeChange(psize) {
            this.pagination.pagesize = psize;
        }
    }
};
</script>

